using System;
using System.Data;
using System.Configuration;
using Clue_Less_Shared.Enumerations;

namespace Clue_Less_Shared
{
    /// <summary>
    /// Character class. Parent class of Player. Stores character type and position.
    /// </summary>
	[Serializable]
    public class Character
    {
        private int _playerID;

        public int PlayerID
        {
            get { return _playerID; }
            set { _playerID = value; }
        }

        private PlayerStatus _status = PlayerStatus.Waiting;

        public PlayerStatus Status
        {
            get { return _status; }
            set { _status = value; }
        }

        private int _index;

        public int Index
        {
            get { return _index; }
            set { _index = value; }
        }

        private Characters _characterType;

        public Characters CharacterType
        {
            get { return _characterType; }
            set { _characterType = value; }
        }
        private short _xPosition;

        public short XPosition
        {
            get { return _xPosition; }
            set { _xPosition = value; }
        }
        private short _yPosition;

        public short YPosition
        {
            get { return _yPosition; }
            set { _yPosition = value; }
        }

        public Character()
        {
            _characterType = Characters.Empty;
            _xPosition = -1;
            _yPosition = -1;
            _playerID = -1;
            _index = -1;
        }

        public Character(Character character)
        {
            this._characterType = character.CharacterType;
            this._index = character.Index;
            this._playerID = character.PlayerID;
            this._status = character.Status;
            this._xPosition = character.XPosition;
            this._yPosition = character.YPosition;
        }

        public Character(Characters name, short x, short y)
        {
            _characterType = name;
            _xPosition = x;
            _yPosition = y;
            _playerID = -1;
            _index = -1;
        }
    }
}
